<template>
	<view class="nav-bar-white">
		<view :style="{height:statusBarHeight+'px'}"></view>
		<uni-nav-bar left-icon="left" background-color="#FFF" color="#000" @clickLeft="back" title="添加规格项" :border="false" fixed="true"></uni-nav-bar>
	</view>
	<view :style="{marginTop:statusBarHeight+45+'px'}">
		<view style="margin-left: 30rpx;padding-top: 20rpx;">
			<text>设置规格项</text>
		</view>
		<view class="spec-item">
			<view class="flex-row items-center">
				<view class="flex-row items-center" style="width: 30%;">
					<text>规格名称</text>	
				</view>
				<input style="width: 70%;" v-model="spec_name" placeholder="如颜色、尺寸、大小" />
			</view>
			<view class="line" style="margin-top: 30rpx;margin-bottom: 30rpx;"></view>
			<view class="flex-row justify-between" @click="addSku">
				<view class="flex-row items-center" style="width: 30%;">
					<text>规格值</text>	
				</view>
				<view class="flex-row items-center">
					<text style="color: #3274F9;">添加规格值</text>
					<uni-icons type="right" size="19"></uni-icons>
				</view>
			</view>
		</view>
		
		
		<view class="btn">
			确认
		</view>
	</view>
</template>

<script>
	import { useUserStore } from '../../store/userStore';
	export default {
		data() {
			return {
				spec_name:''
			};
		},
		computed:{
			statusBarHeight(){
				return useUserStore().statusBarHeight
			}
		},
		methods:{
			addSku(){
				uni.navigateTo({
					url:'/pages/add_goods/add_sku'
				})
			},
			back(){
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss">
.spec-item{
	background-color: #fff;
	border-radius: 10rpx;
	margin: 15rpx;
	padding: 30rpx;
	display: flex;
	flex-direction: column;
}
.btn{
	height: 80rpx;
	margin-top: 100rpx;
	margin-left: 50rpx;
	margin-right: 50rpx;
	background-color: #3274F9;
	border-radius: 45rpx;
	color: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
}
</style>
